import tkinter as tk

root=tk.Tk()

v = tk.StringVar()
vv = tk.StringVar()

b1=tk.Text(root, fg='red', bg = 'white')
b1.pack()

e = tk.Entry(root, textvariable=v)
e.pack(padx=10, pady=10, fill = tk.X)

def OnOK():
    b1.insert('end', v.get() + '\n')
    e.delete(0, 'end')
    print(b1.get('1.0', 'end-1c'))

btn = tk.Button(root, width=10, text='发送', command=OnOK)
btn.pack(padx=10, pady=10)
root.mainloop()